Skip to main content

All Questions

Tagged with
0votes
1answer
273views

Bash: psql command not found when called inside a function

I have a bash script, where the psql connect string is stored in a variable. After this I have defined three functions. ————————— export PC="usr/bin/psql --host=abx --port=1234 --dbname=A --...
Bash3d's user avatar
-2votes
2answers
1kviews

Cannot create /proc/sys/vm/drop_caches: Permission denied

I am using python because i try to run some queries from psql in cold state in a for loop.So before the execution of every query my cache must be clear.I imported os and then i did this: if state==&...
xaroulis gekas's user avatar
-1votes
1answer
2kviews

How to pass a list to psql on command line?

I'd like to know if there's a way do so something like this : lab-2:/tmp# echo 46692,46694,46696,46704,46708,46709,46713,46730,46736,46574 > deletelist.txt lab-2:/tmp# cat deletelist.txt 46692,...
dot's user avatar
  • 735
0votes
1answer
523views

How to run command after entering postgres

I am trying to execute ls after opening a new Guake tab and logging into postgres. guake -n guake -e 'sudo -i -u postgres && ls' The command successful opens a new tab then prompts me for my ...
user's user avatar
  • 2,407
0votes
1answer
193views

.sh script error issues

I have a sh script with which I connect to postgres DB and execute a psql command. The script is as shown below: /opt/postgres/9.2/bin/psql pcwh -U pcwhuser << EOF \i /opt/emms/emsam/tmp/...
user3393089's user avatar
15votes
1answer
2kviews

Why does `postgres` require a shell?

In my Debian Wheezy systems, I noticed that the postgres user 'postgres', the "PostgreSQL administrator", uses /bin/bash as shell. However, I cannot figure out why this is needed. Changing this to /...
timothymctim's user avatar
1vote
2answers
1kviews

How do I specify which version of the PostgreSQL client (psql) to run?

Here's my situation: I have two versions of PostgreSQL installed on my CentOS system, and with the two versions come two different psql interactive terminals. One is located at /usr/bin/psql, and ...
Nyx's user avatar
  • 31

close